<div class="box box-solid box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">{{modal.header}}</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" name="scheduleForm">
        <div class="box-body">

            <div class="form-group has-feedback" ng-class="{'has-success' : !scheduleForm.taskName.$pristine && scheduleForm.taskName.$valid,
            'has-error' : !scheduleForm.taskName.$pristine && scheduleForm.taskName.$invalid}">
                <label for="taskName" class="col-sm-4 control-label">任务名称</label>

                <div class="col-sm-8">
                    <input type="text" class="form-control" required ng-maxlength=40 ng-minlength=2 ng-pattern="/^[a-zA-Z|0-9]*$/"
                           ng-model="modal.taskName" name="taskName"  disabled
                           id="taskName" placeholder="任务名称">

                    <div ng-show="!scheduleForm.taskName.$pristine && scheduleForm.taskName.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!scheduleForm.taskName.$pristine && scheduleForm.taskName.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">任务名称必须大于2位并小于40位因为字符串</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !scheduleForm.strategyName.$pristine && scheduleForm.strategyName.$valid,
            'has-error' : !scheduleForm.strategyName.$pristine && scheduleForm.strategyName.$invalid}">
                <label for="strategyName" class="col-sm-4 control-label">策略名称</label>

                <div class="col-sm-8">
                    <input type="text" class="form-control" required ng-maxlength=40 ng-minlength=2 ng-pattern="/^[a-zA-Z|0-9]*$/"
                           ng-model="modal.strategyName" name="strategyName"
                           id="strategyName" placeholder="策略名称">

                    <div ng-show="!scheduleForm.strategyName.$pristine && scheduleForm.strategyName.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!scheduleForm.strategyName.$pristine && scheduleForm.strategyName.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">策略名称必须大于2位并小于40位因为字符串</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="type" class="col-sm-4 control-label">任务类型</label>

                <div class="col-sm-8">
                    <select class="form-control" id="type" ng-model="modal.kind"
                            ng-options="x for x in modal.typeList">
                    </select>
                </div>
            </div>




            <div class="form-group has-feedback">
                <label for="taskParameter" class="col-sm-4 control-label">任务参数</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           ng-model="modal.taskParameter" name="taskParameter"
                           id="taskParameter" placeholder="任务参数">
                </div>
            </div>

            <div class="form-group has-feedback" ng-class="{'has-success' : !scheduleForm.numOfSingleServer.$pristine && scheduleForm.numOfSingleServer.$valid,
            'has-error' : !scheduleForm.numOfSingleServer.$pristine && scheduleForm.numOfSingleServer.$invalid}">
                <label for="numOfSingleServer" class="col-sm-4 control-label">单JVM最大线程组数量</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.numOfSingleServer" name="numOfSingleServer"
                           id="numOfSingleServer" placeholder="单JVM最大线程组数量">

                    <div ng-show="!scheduleForm.numOfSingleServer.$pristine && scheduleForm.numOfSingleServer.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!scheduleForm.numOfSingleServer.$pristine && scheduleForm.numOfSingleServer.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">单JVM最大线程组数量必须是数字</label>
                    </div>
                </div>
            </div>
            <div class="form-group has-feedback" ng-class="{'has-success' : !scheduleForm.assignNum.$pristine && scheduleForm.assignNum.$valid,
            'has-error' : !scheduleForm.assignNum.$pristine && scheduleForm.assignNum.$invalid}">
                <label for="assignNum" class="col-sm-4 control-label">最大线程组数量</label>

                <div class="col-sm-8">
                    <input type="number" class="form-control" required ng-maxlength=40
                           ng-model="modal.assignNum" name="assignNum"
                           id="assignNum" placeholder="最大线程组数量">

                    <div ng-show="!scheduleForm.assignNum.$pristine && scheduleForm.assignNum.$valid">
                        <span class="glyphicon glyphicon-ok form-control-feedback"></span><label class="control-label">验证通过</label>
                    </div>
                    <div ng-show="!scheduleForm.assignNum.$pristine && scheduleForm.assignNum.$invalid">
                        <span class="glyphicon glyphicon-remove form-control-feedback"></span><label class="control-label">最大线程组数量必须是数字</label>
                    </div>
                </div>
            </div>

            <div class="form-group has-feedback">
                <label for="ipList" class="col-sm-4 control-label">IP地址</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"
                           ng-model="modal.ipList" name="ipList"
                           id="ipList" placeholder="IP地址">
                </div>
            </div>
            <div class="box-footer col-sm-12">
                <button type="button" class="btn btn-default pull-left" data-dismiss="modal" ng-click="cancel()">
                    关闭
                </button>
                <button type="button" ng-disabled="!scheduleForm.$valid" class="btn pull-right btn-primary" ng-click="ok()">
                    {{modal.btnName}}
                </button>
            </div>
        </div>
    </form>
</div>
